/**
 * @Title: EvplantController.java
 * @Package com.dz.ss.controller
 * @author pengyu
 * @date 2015年11月23日 上午10:21:55
 * @version V1.0
 */
package tt.dz.mvc.controller.middleware;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import tt.dz.entity.base.JsonCommon;
import tt.dz.service.middleware.LoginService;
import tt.dz.util.StringUtil;
@RestController
@RequestMapping("/loginController")
public class ChargerLoginController {
	/**
	 * 日志对象
	 */
	private Logger logger = LoggerFactory.getLogger(ChargerLoginController.class);
	@Autowired
	LoginService loginService;	
	
	@RequestMapping("/evCharLogin") 
	@ResponseBody
	public JsonCommon<String> evCharLogin(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map<String,String> map = StringUtil.getParameterByMiddle(request);
		return loginService.evCharLogin(map);
		 
	}	
	//电桩签退请求
	@RequestMapping("/dzLoginOut") 
	@ResponseBody
	public JsonCommon<String> dzLoginOut(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map<String,String> map = StringUtil.getParameterByMiddle(request);
		return loginService.dzLoginOut(map);
	}
	
}
